#include <iostream>
#include <cstring>

using namespace std;

void tj(char * str)
{
//	char a[100] = {'1', '2', '\0'};

//	cout << strlen(a);
	int l = strlen(str);

	int i;
	int num = 0, zm = 0, k = 0;
	for(i = 0; i < l; i ++)
	{
		if(str[i] == ' ')
			k ++;
		if((str[i] >= '0') && (str[i] <= '9'))
			num ++;
		if(((str[i] >= 65) && (str[i] <= 90)) || ((str[i] >= 97) && (str[i] <= 122)))
			zm ++;
	}
	cout << "字母 = " << zm << endl;
	cout << "数字 = " << num << endl;
	cout << "空格 = " << k << endl;
}

int main(void)
{
	cout << "string: ";

	char str[100];

	int i = 0;

	do
	{
		scanf("%c", &str[i]);
		i ++;
	}
	while(str[i - 1] != '#');
	str[i - 1] = '\0';

	tj(str);

	return 0;
}
